﻿CREATE TABLE [dbo].[HotelsRoomsPictures] (
    [PictureId]   INT            IDENTITY (1, 1) NOT NULL,
    [HotelId]     INT            NOT NULL,
    [RoomId]      INT            NULL,
    [PictureName] NVARCHAR (128) NOT NULL,
    CONSTRAINT [PK_HotelsRoomsPictures] PRIMARY KEY CLUSTERED ([PictureId] ASC),
    CONSTRAINT [FK_HotelsRoomsPictures_Hotel] FOREIGN KEY ([HotelId]) REFERENCES [dbo].[Hotel] ([HotelId]),
    CONSTRAINT [FK_HotelsRoomsPictures_Room] FOREIGN KEY ([RoomId]) REFERENCES [dbo].[Room] ([RoomId])
);

